<template>
	<view>
		<view class="ok-view">
			<image src="http://file.quantifynet.com/image/icon_place_an_order_successfully.png"></image>
			<view class="ok-title">支付成功</view>
			<view class="seller-name">{{sellerName}}</view>
			<view class="ok-price"><span style="font-size: 32rpx;">￥</span>{{price}}</view>
			<view @click="backMain()" class="backMain">返回首页</view>
		</view>
		<ad unit-id="adunit-5476933a4729cdd9" bindload="adLoad" binderror="adError" bindclose="adClose"></ad>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				sellerName:'',
				price:0,
				
			}
		},
		onLoad(op) {
				this.price = op.price;
				this.sellerName = op.sellerName;
		},
		methods: {
			onAdplay(e) {
			    console.log('onAdplay', e)
			  },
			  adLoad(e){
			    console.log('onAdload', e)
			  },
			  adClose(e) {
			    console.log('onAdclose', e)
			  },
			  adError(e) {
			    console.log('onAdError', e)
			  },
			  backMain(){
				  uni.reLaunch({
				  	url:'/pages/index/index'
				  })
			  },
		}
	}
</script>

<style lang="scss">
	page{
		background-color: #f7f7f7;
	}
	.ok-view{
		width: 100%;
		height: 494rpx;
		background-color: #fff;
		display: flex;
		flex-direction: column;
		align-items: center;
		.ok-title{
			font-family: PingFangSC, PingFang SC;
			font-weight: 400;
			font-size: 32rpx;
			color: #24AF41;
			margin-top: 20rpx;
		}
		.seller-name{
			margin-top: 52rpx;
			font-family: PingFangSC, PingFang SC;
			font-weight: 400;
			font-size: 32rpx;
			color: #333333;
		}
		.ok-price{
			font-family: PingFang-SC, PingFang-SC;
			font-weight: bold;
			font-size: 48rpx;
			margin-top: 8rpx;
			color: #333333;
		}
		image{
			margin-top: 84rpx;
			width: 120rpx;
			height: 120rpx;
		}
		.backMain{
			height: 88rpx;
			width: 222rpx;
			border-radius: 44rpx;
			text-align: center;
			background-color: #24AF41;
			line-height: 44rpx;
			display: flex;
			justify-content: center;
			align-items: center;
			color: #fff;
			font-size: 30rpx;
			font-weight: 500;
		}
	}
	.ad{
		width: 100%;
	}
</style>
